package com.ftg.learn.bus.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ftg.learn.bus.VO.busUseRegidtrationVo;
import com.ftg.learn.bus.entity.BusUseRegistration;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 公车使用登记表 服务类
 * </p>
 *
 * @author LSY
 * @since 2022-03-21
 */
public interface IBusUseRegistrationService extends IService<BusUseRegistration> {

    /**
     * 添加公车使用登记表所有信息
     * @param bid
     * @param user_name
     * @param user_phone
     * @param start_place
     * @param end_place
     * @param end_mileage
     * @param borrow_time
     * @param is_special
     * @param actual_purpose
     * @return
     */
    boolean insertInfor(Long bid, String user_name, String user_phone,
                        String start_place, String end_place, String end_mileage, String borrow_time,
                        String is_special, String actual_purpose);

    /**
     * 按照使用表id查询
     * @param burid
     * @return
     */
    List<BusUseRegistration> selectById1(Long burid);

    /**
     * 按照bus_name公车名查询
     * @param bus_name
     * @return
     */
    List<BusUseRegistration> busShowByName(String bus_name);

    /**
     * 查询搜索分页
     * @param pagination
     * @param bus_name
     * @return
     */
    List<BusUseRegistration> showBusName(Page<BusUseRegistration> pagination, String bus_name);

    /**
     * 查询公车表里的bid,bus_name
     * @return
     */
    List<Map<String,String>> showAllName();

    /**
     * 首页分页查询
     * @param pagination
     * @return
     */
    List<busUseRegidtrationVo> showBusNamePage(Page<busUseRegidtrationVo> pagination);
}
